package model

import (
	"engine/consts"
	"github.com/shopspring/decimal"
)

type QueryAgencyApplication struct {
	Status consts.AgencyApplicationStatus `json:"status" form:"status"  example:"active"`
	PublicSearchData
}

type UpdateAgencyApplicationReq struct {
	AgencyId    uint64                         `json:"agencyId"  example:"1"`
	Name        string                         `json:"name" example:"name"`
	CountryCode string                         `json:"countryCode" example:"country_code"`
	ShortName   string                         `json:"shortName" example:"shortName"`
	Email       string                         `json:"email" example:"email"`
	Region      string                         `json:"region" example:"region"`
	Phone       string                         `json:"phone" example:"phone"`
	Company     string                         `json:"company" example:"company"`
	Website     string                         `json:"website" example:"website"`
	Description string                         `json:"description" example:"description"`
	Status      consts.AgencyApplicationStatus `json:"status"`
}

type CmsQueryAgencies struct {
	QueryAgencies
	AgencyId uint64 `form:"agencyId" example:"1"`
}

type QueryAgencies struct {
	AdvisorId  uint64              `form:"advisorId" example:"1"`
	Status     consts.CommonStatus `form:"status" example:"active"`
	ProxyLevel int                 `form:"proxyLevel" example:"1"`
	PublicSearchData
}
type RegisterUserReq struct {
	Mobile   string `json:"mobile" binding:"required" example:"132****8888"`
	Password string `json:"password" binding:"required" example:"123456"`
	//Pwd            string `json:"pwd" binding:"required" example:"123456"`
	Code           string `json:"code" binding:"required" example:"code"`
	InvitationCode string `json:"invitationCode" binding:"required" example:"WDERER2"`
	K              int    `form:"k" json:"k" `
}
type SaveAgenciesReq struct {
	AdvisorId   uint64          `json:"advisorId" binding:"required" example:"1"`
	DefaultHost string          `json:"defaultHost" example:"default"`
	Credit      decimal.Decimal `json:"credit" example:"credit"`
	SaveSecondAgenciesReq
}

type SaveSecondAgenciesReq struct {
	Name           string              `json:"name" binding:"required" example:"name"`
	ShortName      string              `json:"shortName" binding:"required" example:"shortName"`
	Logo           string              `json:"logo" example:"logo"`
	ContactName    string              `json:"contactName" binding:"required" example:"contactName"`
	ContactEmail   string              `json:"contactEmail" binding:"required" example:"contactEmail"`
	ContactPhone   string              `json:"contactPhone" binding:"required" example:"contactPhone"`
	ContactRegion  string              `json:"contactRegion" binding:"required" example:"contactRegion"`
	ContactAddress string              `json:"contactAddress"`
	Status         consts.AgencyStatus `json:"status" binding:"required"`
}

type AgencyTopUp struct {
	Reference   string          `json:"reference" binding:"required"`
	Received    decimal.Decimal `json:"received" binding:"required"`
	Currency    string          `json:"currency" binding:"required"`
	Rate        decimal.Decimal `json:"rate" binding:"required"`
	Transaction decimal.Decimal `json:"transaction"`
	IsSendEmail bool            `json:"isSendEmail"`
}

type UpdateAgencyCredit struct {
	Credit decimal.Decimal `json:"credit" binding:"required"`
}

type SearchBalanceListReq struct {
	Id          string   `json:"id" form:"id"`
	ReferenceId string   `json:"referenceId" form:"referenceId"`
	BillType    string   `json:"billType" form:"billType"`
	CreatedAt   []string `json:"createdAt" form:"createdAt"`
	PublicSearchData
}

type CmsAgencySearchBalanceListReq struct {
	Id          string   `json:"id" form:"id"`
	ReferenceId string   `json:"referenceId" form:"referenceId"`
	BillType    string   `json:"billType" form:"billType"`
	CreatedAt   []string `json:"createdAt" form:"createdAt"`
	ShowSecond  bool     `json:"showSecond" form:"showSecond"`
	PublicSearchData
}
